package cn.csdj.sism.service.impl;

import cn.csdj.sism.dao.StudentClassMapper;
import cn.csdj.sism.pojo.StudentClass;
import cn.csdj.sism.service.StudentClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * @author 李心怡
 * 2023/4/10
 */
@Service
public class StudentClassServiceImpl implements StudentClassService {
    @Autowired
    private StudentClassMapper studentClassMapper;
    @Override
    public int insert(StudentClass studentClass) {
        return studentClassMapper.insert(studentClass);
    }

    @Override
    public int deleteById(Integer id) {
        return studentClassMapper.deleteById(id);
    }

    @Override
    public int update(StudentClass studentClass) {
        return studentClassMapper.updateById(studentClass);
    }

    @Override
    public StudentClass selectById(Integer id) {
        return studentClassMapper.selectById(id);
    }

    @Override
    public List<StudentClass> selectAll() {
        return studentClassMapper.selectList(null);
    }
}
